<?php

require_once("../config.inc.php");

//uploadDir =
//uploadFile = UPLOAD_DIR.$_FILES['upfile']['name'];
if($_FILES['upfile']['name']==UPLOAD_ERR_OK)
{
	$find_type = strtolower(pathinfo($_FILES['upfile']['name'], PATHINFO_EXTENSION));
	$upload_type = ".jpg,.jpeg,.gif,.png,.bmp";
	$allow_type = strpos($upload_type, $find_type);
	if($allow_type === FALSE){
		echo("文件类型不对");
		exit();
	}
	$upload_file = UPLOAD_DIR.basename($_FILES['upfile']['name']);

	$file_num = 1;
	$exist_files = glob("UPLOAD_DIR/*.*");
	foreach($exist_files as $filename)
	{

	}

	if(file_exists($upload_file))
	{

	}
}

?>